\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\f0\b0\i0\ul0\fs28 Q: I'm in a very heterogeneous environment. My /usr/spool/mail directory is mounted from another machine (a Sun Sparcstation). I'd like to use the NeXT Mail app, but it won't fetch my mail. The little letters don't even pop up in the envelope! I know I have mail because the Berkeley Mail program works, and so does biff and from.\
\
A: The NeXTMail app needs to write a lock file in the /usr/spool/mail directory. If it can't write that file, it can't even check for mail. \
\
First, check the permissions, groups and owners of /usr/spool/mail. This is what we found at one site:\
\
\f1\fs22\fc0 myhostname > ls -ltdg /usr/spool/mail\
drwxrwxr-x 3 root mail 1024 Jan 28 15:46 /usr/spool/mail/\
\f0\fs34 \
\fs28 They had created a new group, called "mail" and made that the group of the /usr/spool/mail directory. They then only gave that group and the owner of the directory (root) the ability to write to that directory. The administrators of the network apparently did this for security's sake. \
\
Mail.app has two executables which need to do stuff in /usr/spool/mail, and their owners come from the factory as:\
\
\f1\fs22 myhostname> ls -ltg /NextApps/Mail.app/M*\
-rwxr-xr-x 1 root wheel 245760 Nov 18 21:25 Mail*\
-r-xr-xr-x 1 root wheel 24576 Nov 15 15:11 MailFetch*\
\
\f0\fs28 Thus Mail can't write in the spool directory, and can't check your mail apparently. If you change both Mail's and MailFetch's group to mail and make them setgroupid, you'll solve this problem. \
\
\f1\fs22 myhostname> su\
Password:\
myhostname# chgrp mail /NextApps/Mail.app/Mail /NextApps/Mail.app/MailFetch\
-r-xr-sr-x 1 root mail 24576 Nov 15 15:11 MailFetch*\
\
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\fs28\fc0 One other possible solution is to set /usr/spool/mail to mode 1777:\
\f2\fs24 \
\f1\fs20 myhostname% ls -ldg /usr/spool/mail\
drwxrwxrwt 9 root wheel 25600 Jan 28 14:20 /usr/spool/mail/\
\f2\fs24 \
\f0\fs28 Note the sticky bit is turned on (the high-order 1 in the 1777, for you non-geeks out there!). This means that even though everyone can write to the directory other things control file deletion. This is the same mode we use in /tmp. Depending on the installation, this solution may or may not be appropriate.\